package com.filetransfer.viewmodel.base;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumnModel;
public class TaskTableModel extends DefaultTableModel {
    public TaskTableModel(String... columnNames) {
        super(columnNames, 0);
    }
    public void addTask(TaskTableRowModel taskInfoRowModel) {
        taskInfoRowModel.bindToTable(this);
    }
    @Override
    public boolean isCellEditable(int row, int column) {
        return false;
    }
    public void editColumnModel(TableColumnModel model) {
        for (int i = 0; i < getColumnCount(); i++) {
            model.getColumn(i).setHeaderValue(getColumnName(i));
        }
    }
}
